package cn.wsalix.templet.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.anlaser.service.impl.SimpleServiceImpl;
import cn.anlaser.utils.SearchFilter;
import cn.wsalix.templet.entity.Templet;
import cn.wsalix.templet.entity.TempletPage;
import cn.wsalix.templet.form.TempletPageForm;
import cn.wsalix.templet.repository.TempletPageRepository;
import cn.wsalix.templet.service.TempletPageService;

@Service("templetPageService")
@Transactional(readOnly = true)
public class TempletPageServiceImpl extends
		SimpleServiceImpl<TempletPageForm, TempletPageRepository, TempletPage>
		implements TempletPageService {

	@Autowired
	private TempletPageRepository templetPageRepository;

	@Override
	public TempletPageRepository getRepository() {
		return templetPageRepository;
	}

	@Override
	public String module() {
		return "templetpage";
	}

	@Override
	public List<TempletPage> findByTemplet(Templet templet) {
		return templetPageRepository.findByTempletId(templet.getId());
	}

	@Override
	public Class<TempletPage> getEntityClazz() {
		return TempletPage.class;
	}

	@Override
	public Map<String, SearchFilter> buildByForm(TempletPageForm form) {
		// TODO Auto-generated method stub
		return null;
	}

}
